<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    
    
        .div1{
            width: 150px;
            height: 150px;
            background-color: gold;
        }
        .div2{
            width: 150px;
            height: 150px;
            background-color: red;
            /*margin-top: 30px;
            margin-left: 30px;
            margin-bottom: 50px;
            margin-right: 50px;*/

            /*顺序和padding一致*/
            /*margin: 30px 50px 50px 30px;*/
        }
        .div3{
            width: 150px;
            height: 150px;
            background-color: blue;
        }
    
    
    </style>
</head>
<body>
    
    <div class="div1">div1</div>
    <div class="div2">div2</div>
    <div class="div3">div3</div>


</body>
</html>